<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="你的js文件目录"></script>
    <style>
        @keyframes mym {
            from{
                transform: rotate(0deg) scale(0.11) ;
            }
            to{
                transform:   rotate(360deg) scale(3.5);
            }
        }
        img{
            animation: mym 1s  linear infinite alternate  ;
            position: absolute;
            margin: auto;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
        }

        img:hover{
            animation:  paused;
        }
    </style>
</head>
<body>
<img src="../img/facebook.png" alt="">
</body>
</html>